<!-- ----------资产--------------- -->
<template>
	<view class="assets">
		<view class="assets_t">
			<image src="/static/image/assets/assets_bcg.png" />
			<view>
				<view>
					<view class="num">{{ info.zyj }}</view>
					<view class="tips">优秀部门业绩</view>
				</view>
				<view>
					<view class="num">{{ info.xqyj }}</view>
					<view class="tips">考核业绩</view>
				</view>
			</view>
		</view>
		<view class="list">
			<navigator
				class="item usdt"
				:style="{ backgroundColor: `#e9eeff` }"
				url="/pages/assets/transactionUSDT"
			>
				<view class="item_l">
					<image src="/static/image/assets/usdt_icon.png" class="img1" />
					<label :style="{ display: `flex` }">
						<text :style="{ fontWeight: `600` }">USDT</text>
					</label>
				</view>
				<view class="item_r">
					<view class="item_r_t">{{ info.ue_money }}</view>
				</view>
			</navigator>
			<navigator class="item etc" url="/pages/assets/transactionETH">
				<view class="item_l">
					<image src="/static/image/assets/etc_icon.png" class="img1" />
					<label :style="{ display: `flex` }">
						<text :style="{ fontWeight: `600` }">ETH</text>
					</label>
				</view>
				<view class="item_r">
					<view class="item_r_t">{{ Number(info.eth).toFixed(6) }}</view>
				</view>
			</navigator>
			<navigator class="item btc" url="/pages/assets/transactionBTC">
				<view class="item_l">
					<image src="/static/image/assets/btc_icon.png" class="img1" />
					<label :style="{ display: `flex` }">
						<text :style="{ fontWeight: `600` }">BTC</text>
					</label>
				</view>
				<view class="item_r">
					<view class="item_r_t">{{ Number(info.btc).toFixed(6) }}</view>
				</view>
			</navigator>
			<navigator
				class="item"
				:style="{ backgroundColor: `#ebfcff` }"
				url="/pages/assets/transactionFIL"
			>
				<view class="item_l">
					<image src="/static/image/assets/fil@2x.png" class="img1" />
					<label :style="{ display: `flex` }">
						<text :style="{ fontWeight: `600` }">FIL</text>
					</label>
				</view>
				<view class="item_r">
					<view class="item_r_t">{{ info.fil || "0.00000" }}</view>
				</view>
			</navigator>

		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info: {},
			};
		},
		onShow() {
			this.$request.get("/Home/info/me").then(({ data }) => {
				this.info = data;
			});
		},
		methods: {
			onNavigationBarButtonTap(e) {
				if (e.float !== "right") return;
				uni.navigateTo({ url: "/pages/assets/assetsDetail" });
			},
			handleToBTC() {
				uni.navigateTo({
					url: `/pages/assets/transactionBTC`,
				});
			},
			handleToETH() {
				uni.navigateTo({
					url: `/pages/assets/transactionETH`,
				});
			},
			handleToUSDT() {
				uni.navigateTo({
					url: `/pages/assets/transactionUSDT`,
				});
			},
		},
	};
</script>

<style lang="scss">
	.assets {
		position: relative;

		.nav {
			display: flex;
			justify-content: space-between;
			align-items: center;
			width: 100%;
			color: #ffffff;
			font-size: 34rpx;
			padding: 0 30rpx;
			background-color: #2a62ff;
			position: fixed;
			left: 0;
			top: 0;
			z-index: 999;
			> navigator {
				font-size: 30rpx;
			}
		}
		.assets_t {
			width: 100%;
			padding-top: 30rpx;
			display: flex;
			justify-content: center;
			position: relative;
			image {
				width: 690rpx;
				height: 200rpx;
			}
			> view {
				width: 690rpx;
				height: 200rpx;
				position: absolute;
				left: 0;
				bottom: 0;
				display: flex;
				justify-content: space-between;
				color: #ffffff;
				padding-top: 60rpx;
				box-sizing: border-box;
				> view {
					width: 50%;
					text-align: center;
					.num {
						font-size: 36rpx;
						line-height: 26rpx;
						margin-bottom: 40rpx;
					}
					.tips {
						font-size: 24rpx;
						line-height: 23rpx;
					}
				}
			}
		}
		.list {
			padding: 30rpx;
			.item {
				width: 100%;
				display: flex;
				justify-content: space-between;
				align-items: center;
				border-radius: 10rpx;
				padding: 20rpx 20rpx;
				box-sizing: border-box;
				margin-bottom: 20rpx;
				.item_l {
					display: flex;
					flex-direction: row;
					align-items: center;
					font-size: 34rpx;
					color: #1a1a1a;
					.img1 {
						width: 60rpx;
						height: 60rpx;
						margin-right: 30rpx;
					}
					.line {
						width: 2rpx;
						height: 30rpx;
						background-color: #a0a0a0;
						margin: 0 30rpx;
					}
					.img2 {
						width: 26rpx;
						height: 30rpx;
					}
				}
				.item_r {
					text-align: right;
					.item_r_t {
						font-size: 32rpx;
						font-weight: 600;
						color: #1a1a1a;
					}
					.item_r_b {
						font-size: 24rpx;
						color: #666666;
					}
				}
			}
			.btc {
				background-color: #f7f0e6;
			}
			.etc {
				background-color: #e6e9f0;
			}
			.usdt {
				background-color: #e3f0e9;
			}
		}
	}
</style>
